package com.yc.springcloud.config;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author DELL
 * @Date 2024/10/8 19:17
 * @Version 1.0
 */
//配置自己的负载均衡算
@Configuration
public class RibbonRule {

	@Bean
	public IRule getRibbonRule(){
		return new RandomRule();
	}
}
